home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / CPY_ALL.DMO < prev    next >
Text File  |  1996-07-04  |  6KB  |  116 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   CPY_ALL .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20. $STACK  2048
  21. $STRING    8
  22.  
  23. $INCLUDE "DAS-NB01.INC"
  24. $INCLUDE "DAS-NB02.INC"
  25. $INCLUDE "DAS-NBT1.INC"
  26. $INCLUDE "DAS-NBT4.INC"
  27.  
  28. SCREEN 0,,2,0                                  ' use Apage 2
  29. FileSpec$ = "DMO\DASLOGO.DAT"                  ' CORRECT?
  30. IF DIR$( FileSpec$ ) = "" THEN                 ' just in case
  31.     TBoxFILL 1, 1, 25, 80, 177, 7              ' fill Apage 2
  32.   ELSE                                         '
  33.     OPEN "B", #1, FileSpec$                    ' read in the data
  34.     GET$ #1, 4005, Scrn$                       ' that was stored
  35.     TBoxWrite Scrn$                            ' fTBoxREAD$ & write
  36.     CLOSE                                      ' to Apage 2
  37.     Scrn$ = ""                                 ' don't need this anymore
  38. END IF                                         '
  39. '──────────────────────────────────────────────
  40. SCREEN 0,,1,0                                  ' Apage 1 is a test screen
  41. Col? = 1 : Cols? = 80                          '
  42.            Rows? = 25                          '
  43. FOR Row? = 1 TO 12                             '
  44.   TBoxDRAW Row?, Col?, Rows?, Cols?, 1, 15     '
  45.   INCR Col?, 2 : DECR Cols?, 4                 '
  46.                  DECR Rows?, 2                 '
  47. NEXT                                           '
  48. Tprint 13, 30, "This is a test screen.", 14    '
  49. '───────────────────────────────────────────────
  50. SCREEN 0,,0,0                                  ' working on Apage 0 now
  51. Push? = 0                                      '
  52.                                                '
  53. DO                                             '
  54.   TBoxCopy 1, 1, 25, 80, 2, 0                  ' copy page 2 to page 0
  55.   G% = fAnyKey%                                ' clear kbrd & wait for a key
  56.   UCASEkey G%                                  ' ucase it
  57.   SELECT CASE G%                               '
  58.     CASE 27, 81  : EXIT LOOP                   '
  59.     CASE 90      : IF Push? = 0 THEN           ' because we are storing the
  60.                              Push? = 1         ' menu screen on page 2 we
  61.                              G$ = "ON "        ' have to write the change
  62.                            ELSE                ' to that screen by 1st
  63.                              Push? = 0         ' setting the Apage to 2
  64.                              G$ = "OFF"        ' then we go back to Apage 0
  65.                          END IF                ' There really are easier
  66.                          SCREEN 0,,2,0         ' ways to do all of this but
  67.                          Tprint 25, 56, G$, 0  ' as a demo it shows how to
  68.                          SCREEN 0,,0,0         ' use the Apage with Tprint
  69.                          ITERATE               '
  70.     CASE 65   : CopyTBoxBL   1, 1, 25, 80, 1
  71.     CASE 66   : CopyTBoxBR   1, 1, 25, 80, 1
  72.     CASE 67   : CopyTBoxTL   1, 1, 25, 80, 1
  73.     CASE 68   : CopyTBoxTR   1, 1, 25, 80, 1
  74.     CASE 69   : CopyTBoxRND  1, 1, 25, 80, 1
  75.     CASE 70   : CopyTBoxVBH  1, 1, 25, 80, 1
  76.     CASE 71   : CopyTBoxVBV  1, 1, 25, 80, 1
  77.     CASE 72   : CopyTBoxZIO  1, 1, 25, 80, 1
  78.     CASE 73   : CopyTBoxDN   1, 1, 25, 80, 1, Push?
  79.     CASE 74   : CopyTBoxHIO  1, 1, 25, 80, 1, Push?
  80.     CASE 75   : CopyTBoxHOI  1, 1, 25, 80, 1, Push?
  81.     CASE 76   : CopyTBoxLF   1, 1, 25, 80, 1, Push?
  82.     CASE 77   : CopyTBoxRT   1, 1, 25, 80, 1, Push?
  83.     CASE 78   : CopyTBoxUP   1, 1, 25, 80, 1, Push?
  84.     CASE 79   : CopyTBoxVIO  1, 1, 25, 80, 1, Push?
  85.     CASE 80   : CopyTBoxVOI  1, 1, 25, 80, 1, Push?
  86.     CASE ELSE : CALL DemoHelp : ITERATE
  87.   END SELECT
  88.   DELAY 1
  89. LOOP
  90.  
  91. CLS
  92. END
  93.  
  94.  
  95. SUB DemoHelp LOCAL PUBLIC
  96.  
  97.   T$ = "There are 16 different ways to copy data from any" +_
  98.        "video page to the currently active page  (Apage)." +_
  99.        "Eight of these have the extra  feature of pushing" +_
  100.        "the area being cleared. The following keys  allow" +_
  101.        "you to see the different styles:"                  + CHR$(13,10) +_
  102.        CHR$(13,10)                                         +_
  103.        "^<A> thru <P> for the 16 different styles"         + CHR$(13,10) +_
  104.        "^<Z> to turn ON/OFF the push feature"              + CHR$(13,10) +_
  105.        "^<Q> quit to DOS"
  106.  
  107.   REPLACE "^" WITH CHR$(9) IN T$                    ' use tabs to center text
  108.   SCREEN 0,,3,0                                     ' we'll use page 3 to
  109.   TBoxDraw   7, 14, 11, 53, 1, 47                   ' draw & print our help
  110.   TprintTEXT 8, 16, 9, 49, T$, 0, &h0D0A, 5, 47     ' box then back to
  111.   SCREEN 0,,0,0                                     ' page 0
  112.   CopyTBoxVIO 7, 14, 11, 53, 3, 0                   ' now copy the box
  113.   fAnyKey                                           ' wait a key-press
  114.   CopyTBoxVOI 7, 14, 11, 53, 2, 0                   ' restore original box
  115.  
  116. END SUB